<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head lang="en" th:replace="include/common/common :: commonHeader">
    <footer th:include="include/common/common :: layUiResource"></footer>
    <footer th:include="include/common/common :: blueCSSResource"></footer>

    <script>
        layui.config({
            base: '/staticResource/layuiadmin/' //静态资源所在路径
        }).extend({
            index: 'lib/index' //主入口模块
        }).use(['index','form'] , function () {
            var admin = layui.admin
                ,element = layui.element
                ,form = layui.form;

            element.render();

            let entityName = 'dictData';
            $(document).ready(function () {
                $.fn.blueJs.tools.formButtonItem(entityName);
            });

            //点击事件监听
            $(document).on('click' , function (event) {
                let targetId = event.target.id;
                let cancelBtn = entityName + "CancelBtn";
                if (targetId == cancelBtn){
                    let index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
                    parent.layer.close(index); //再执行关闭
                }
            });

            form.on('submit(' + entityName + 'Save)',function () {
                let msg = $.fn.blueJs.tools.formSubmit(this)
                    ,type = 'saveMsg';
                //当你在iframe页面关闭自身时
                let index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
                $.fn.blueJs.tools.active[type].call(this , msg , index);
                return false;
            });

        });


    </script>
</head>
<body>
<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md12">
            <div class="layui-card">
                <div class="layui-card-body">
                    <form class="layui-form" id="dictDataForm" th:object="${dictData}" method="post" action="/a/dict/save2Data">
                        <!--<div class="box-body">-->
                        <div class="blue-form-unit">基本信息</div>
                        <input type="hidden" name="id" id="dictId" th:field="*{id}"/>
                        <input type="hidden" name="isNewRecord" th:field="*{isNewRecord}"/>
                        <input type="hidden" name="dictType" id="dictType" th:field="*{dictType}"/>
                        <input type="hidden" id="orgCode" name="orgCode" th:field="*{orgCode}"/>
                        <!--    <input type="hidden" name="treeCode" th:field="*{treeCode}"/>-->
                        <div class="layui-form-item">
                            <div class="layui-col-md6">
                                <label class="layui-form-label " title=""><span class="blue-required ">*</span>字典标签：</label>
                                <div class="layui-input-block">
                                    <input type="text" class="layui-input" lay-verify="required" placeholder="" id="configName" th:field="*{dictLabel}">
                                </div>
                            </div>

                            <div class="layui-col-md6">
                                <label class="layui-form-label " title=""><span class="blue-required ">*</span>字典键值：</label>
                                <div class="layui-input-block">
                                    <input type="text" class="layui-input" lay-verify="required" placeholder="" id="dictValue" th:field="*{dictValue}">
                                </div>
                            </div>
                        </div>

                        <div class="layui-form-item">
                            <div class="layui-col-md6">
                                <label class="layui-form-label " title=""><span class="blue-required hide">*</span>排序序号：</label>
                                <div class="layui-input-block">
                                    <input type="text" class="layui-input" lay-verify="" placeholder="" id="sort" th:field="*{sort}">
                                </div>
                            </div>

                            <div class="layui-col-md6">
                                <label class="layui-form-label " title=""><span class="blue-required ">*</span>是否系统：</label>
                                <div class="layui-input-block">
                                    <input type="radio" th:field="*{isSys}" value="1" title="是">
                                    <input type="radio" th:field="*{isSys}" value="0" title="否">
                                </div>
                            </div>
                        </div>

                        <div class="layui-form-item">
                            <div class="layui-col-md12">
                                <label class="layui-form-label " title=""><span class="blue-required hide">*</span>字典描述：</label>
                                <div class="layui-input-block">
                                    <textarea rows="4" maxlength="500" class="layui-textarea" th:text="*{description}"></textarea>
                                </div>
                            </div>
                        </div>

                        <div class="layui-form-item">
                            <div class="layui-col-md12">
                                <label class="layui-form-label " title=""><span class="blue-required hide">*</span>备注：</label>
                                <div class="layui-input-block">
                                    <textarea name="remarks" rows="4" maxlength="500" class="layui-textarea" th:text="*{remarks}"></textarea>
                                </div>
                            </div>
                        </div>

                        <!-- Form 按钮组-->
                        <div class="layui-form-item layui-layout-admin">
                            <div class="layui-input-block blue-form-button-item"></div>
                        </div>

                    </form>
                </div>
            </div>
        </div>
    </div>
</div>

</body>
</html>




